An optical encoder is conventionally known, which is arranged to generate an output signal indicative of the rotary position of a rotary shaft in accordance with an output signal of a light receiving element disposed in facing relation to a light emitting element through a slitted disk mounted on the rotary shaft.
A typical optical encoder comprises a first pair (phase A) of light receiving elements A31, A32 and a comparator Ca3 for phase A (FIG. 3) connected to these light receiving elements, and further comprises a second pair (phase B) of light receiving elements B31, B32 and an associated comparator Cb3 (not shown). (Illustrations of elements associated with phase B will be similarly omitted hereinbelow.) Positions of these four light receiving elements are so adjusted that the light receiving element pair of each phase generate output signals ia31, ia32 (ib31, ib32) having a phase difference of 180 degrees from each other, and the comparator of each phase generates a rectangular signal Pa3 (Pb3) whose on-time width and off-time width are the same with each other, the rectangular signals Pa3 and Pb3 having a phase difference of 90 degrees. However, if an offset OSa3 (OSb3) is produced between direct current component levels of the output signals respectively supplied from the light receiving elements of the both phases, the on time period of the rectangular signal of each phase differs from the off time period thereof, or the phase difference between the rectangular signals of the both phases is deviated from the 90 degrees. This makes it impossible to generate accurate position signals.
Conventionally, to obviate the above drawback, variable resistors VRa3 and VRb3, each having opposite ends connected between positive and negative input terminals of an associated one of the comparators, are provided, and the sliding position of a movable contact, connected to a power source Vr3, of each variable resistor is so varied as to eliminate the offset between the direct current components of the outputs from an associated one of the light receiving element pairs connected to the comparators. However, according to such offset adjustment, when the movable contact of the variable resistor is greatly moved away from its central position so as to eliminate a large offset, the load resistances of the light receiving elements differ from each other. In this case, if noise is applied to the optical encoder, noise applied to one of the light receiving elements is greatly different in magnitude from that applied to the other because of the load resistance difference between the light receiving elements. This makes it difficult to generate accurate rotary position signals. In other words, the conventional optical encoder is poor in its noise-resistant property, and accordingly, is unstable in rotary position detection.